<%@page import="cn.edu.ujn.finallab.dao.Customer"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>顾客信息</title>
<link href="<c:url value="/css/indexOfAdmin.css"/>" rel="stylesheet"
	type="text/css" />
</head>
<body>
	<div class="whole">
		<div class="front"></div>
		<div class="footer"></div>
		<div class="title">酒&nbsp;店&nbsp;会&nbsp;员&nbsp;信&nbsp;息&nbsp;表 <span class="return"><a href="/finallab/return" onclick="return confirm('返回主页？')" style="color: red;">返回主页</a></span></div>
		<div class="find" style="display: inline-block; text-align: center; margin-left: 30%; margin-bottom: 20px">
			<div style="display: inline-block">
			<form action="<c:url value="/selectCustomerByIdcard"/>" method="post">
			<span style="font-size: 16px">根据会员身份证号查询：</span> 
			<input type="text" style="height: 20px; width: 200px" name="customeridcard" placeholder="请输入身份证号进行查询">
			<input type="submit" value="查询" style="width: 50px">
			</form>
			</div>
		</div>
		<div class="info">
		<c:if test="${requestScope.pagemsg.rows == null}">
			<div class="msg" style="color: red; width: 100%; text-align: center; font-size: 16px; margin-left: -90px; margin-top: 10px">		
				查询结果为空！	
			</div>
		</c:if>
		<c:if test="${requestScope.pagemsg.rows != null}">	
		<table class="table table-bordered table-striped" border="1">
			<thead>
				<tr>
					<th>会员编号</th>
					<th>会员姓名</th>
					<th>会员密码</th>
					<th>手机号码</th>
					<th>身份证号</th>
					<th>修改信息</th>
					<th>删除记录</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${requestScope.pagemsg.rows}" var="row">
					<tr>
						<td>${row.id}</td>
						<td>${row.name}</td>
						<td>****已加密****</td>
						<td>${row.phone}</td>
						<td>${row.idcard}</td>
						<td class="modify"><a href="/finallab/modifyCustomer?currentPage=${requestScope.pagemsg.page}&id=${row.id}">修改</a></td>
						<td class="delete"><a href="/finallab/deleteCustomer?id=${row.id}" onclick="return confirm('确定删除？')" >删除</a></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		</div>
		<div class="page">
		<span>第${requestScope.pagemsg.page}页，共${requestScope.pagemsg.totalpage}页，总会员数：${requestScope.pagemsg.total}</span>
		<span> <c:if test="${requestScope.pagemsg.page != 1}">
					<a href="${pageContext.request.contextPath }/allCustomer?currentPage=1">[首页]</a>
					<a href="${pageContext.request.contextPath }/allCustomer?currentPage=${requestScope.pagemsg.page-1}">[上一页]</a>
				</c:if> 
				<c:if test="${requestScope.pagemsg.page != requestScope.pagemsg.totalpage}">
					<a href="${pageContext.request.contextPath }/allCustomer?currentPage=${requestScope.pagemsg.page+1}">[下一页]</a>
					<a href="${pageContext.request.contextPath }/allCustomer?currentPage=${requestScope.pagemsg.totalpage}">[尾页]</a>
				</c:if>
		</span>
		</div>
		</c:if>
	</div>
</body>
</html>